-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix paid green marker for Native #50554
Fix paid green marker for Native #50554
Conversation
@rushatgabhane Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Reviewer Checklist
Screenshots/VideosAndroid: mWeb Chrome |
We did not find an internal engineer to review this PR, trying to assign a random engineer to #50219 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for digging
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/mountiny in version: 9.0.50-0 🚀
|
🚀 Deployed to production by https://github.com/marcaaron in version: 9.0.50-8 🚀
|
Details
Expense preview does not display green checkmark when the expense is paid.
Technically what happened here - issue related to combination of re-renders threads and
useAnimatedStyle
.useSharedValue
is running in 2 threads - JS and UI. When we set a new value(from 0 to 1)
- we store value in JS and tells UI thread that value can be used in styling.useAnimatedStyle
is also running in 2 threads - JS and UI. Both of them initially stored{ scale: 0 }
. When we set a new valueuseAnimatedStyle
both sync JS and UI thread and prepare on UI thread new styles - which ready to be used/painting - but - When we moving away to next screen - UI thread will be changed - anduseAnimatedStyle
will lost/cancel animation styling. Technically we just still have correct useSharedValue value on JS thread - UI thread does not have those updates. To put those updates in UI thread - we need to reset useSharedValue to 0 and set again to 1 (to run again useAnimatedStyle hook with new value) - which is overkill.Correct solution here - just not rely on
useAnimatedStyle
UI thread at all to build styling (because in our special case it will be destroyed during navigating to next screen). We can just rely on useSharedValue and use animation style directly in render.Fixed Issues
$ #50219
PROPOSAL:
Tests
Offline tests
Fix is not influence on offline pattern for that workflow
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
8mb.video-h8t-hXVUE9j8.mp4
Android: mWeb Chrome
8mb.video-nrn-Zof5zjmZ.mp4
iOS: Native
8mb.video-5sI-cdeKkVOh.mp4
iOS: mWeb Safari
ios-web.mov
MacOS: Chrome / Safari
web.mov
MacOS: Desktop
desktop.mov